<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class HookController extends Controller
{
    public function form(Request $request)
    {
        $params = $request->all();
        file_put_contents('hook_form.json', json_encode($params, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND);
        return response()->json([
            'bind_code' => $params['bind_code'] ?? '',
        ]);
    }
}
